﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TAS.XtOM.Tutorial.Web.Models.LinkedIn
{
	/// <summary>
	/// This class doesnt inherit from the XmlMappedObject class. Instead you can implement the IXmlMappedObject and implement 2 methods. 
	/// XmlMappedObject class has 2 static methods that you can call. Se below.
	/// </summary>
	public class LIEducation : IXmlMappedObject
	{
		[MapperInstructions("/education/id")]
		public string Id { get; set; }
		[MapperInstructions("/education/school-name")]
		public string SchoolName { get; set; }
		[MapperInstructions("/education/notes")]
		public string Notes { get; set; }
		[MapperInstructions("/education/activities")]
		public string Activities { get; set; }
		[MapperInstructions("/education/degree")]
		public string Degree { get; set; }
		[MapperInstructions("/education/field-of-study")]
		public string FieldOfStudy { get; set; }
		[MapperInstructions("/education/start-date/year")]
		public string StartYear { get; set; }
		[MapperInstructions("/education/start-date/month")]
		public string StartMonth { get; set; }

		/// <summary>
		/// Implemented by IXmlMappedObject
		/// </summary>
		/// <param name="xml"></param>
		public void MapXmlData(string xml)
		{
			XmlMappedObject.MapXmlData(this, xml);
		}

		/// <summary>
		/// Implemented by IXmlMappedObject
		/// </summary>
		/// <param name="xmlDocument"></param>
		public void MapXmlData(System.Xml.XmlDocument xmlDocument)
		{
			XmlMappedObject.MapXmlData(this, xmlDocument);
		}

		/// <summary>
		/// Implemented by IXmlMappedObject
		/// </summary>
		/// <param name="xmlDocument"></param>
		/// <param name="manager"></param>
		public void MapXmlData(System.Xml.XmlDocument xmlDocument, System.Xml.XmlNamespaceManager manager)
		{
			XmlMappedObject.MapXmlData(this, xmlDocument, manager);
		}
	}
}
